import React from 'react';
import { Table } from 'antd';

// type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;

interface TableProps {
  columns: any[];
  data: { list: []; pagination: {} };
}

export default class Index extends React.Component<TableProps> {
  render() {
    const { columns, data, ...extra } = this.props;
    return (
      <Table
        rowKey={'id'}
        columns={columns}
        dataSource={data.list}
        pagination={data.pagination}
        {...extra}
      />
    );
  }
}
